#include <54func.h>
void *threadFunc(void *arg){
    //pthread_exit(NULL);
    //pthread_exit((void *)123);
    int *p = (int *)malloc(sizeof(int));
    pthread_exit(p);// 不推荐
}
int main(int argc, char *argv[])
{
    pthread_t tid;
    pthread_create(&tid,NULL,threadFunc,NULL);
    //void **retval = (void **)malloc(sizeof(void *));
    //pthread_join(tid,retval);
    void * retval;
    pthread_join(tid,&retval);
    printf("retval = %ld\n", (long)retval);
    return 0;
}

